package com.igeek.boot.servlet;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * @Author fengqq
 * @Description TODO
 * @Date 2024/8/19  15:47
 *
 * 过滤器 和 拦截器 的区别：
 */
//@WebFilter(filterName = "myFilter",urlPatterns = "/my")
public class MyFilter implements Filter {
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("MyFilter doFilter 执行了");
        //放行
        chain.doFilter(request,response);
    }
}
